PCA Index Dashboard Examples

PCA Index Dashboard Examples#

This script was last run at 2024-03-12 10:03:53.874273+00:00 (UTC)
In US/Central Time, this is 2024-03-12 05:03:53.874273-05:00
import pandas as pd
import pandas_datareader
import config

def load_vix_from_fred(start="1998-01-01", end="2022-12-31"):
    """
    Load VIX data from FRED
    """
    df = pandas_datareader.get_data_fred("VIXCLS", start=start, end=end)
    return df
import matplotlib.pyplot as plt

# Assuming you have the data for the CBOE VIX index stored in a variable called 'vix_data'
# Plotting the graph

df = load_vix_from_fred()
df.plot()

# Adding labels and title
plt.xlabel('Time')
plt.ylabel('VIX Index')
plt.title('CBOE VIX Index')

# Displaying the graph
plt.show()
../../_images/a983c1d94c8a501c0efab0e97d2be25913ecec66d838d47fe667e6da79fc5ae0.png
../../_images/5614e402c2d90d69677fc2164953cdd9d979b3ff0d1dce9eabd93580995986a6.png
../../_images/78b59e075fb07356e8ab346912e988c01d4d82f544a487245411cf7e2b6417e0.png